package com.xyz.scalamodule

object XYHiveTest {

  def main(args: Array[String]): Unit = {

    val argsarr=Array("HiveTest")

    val methodname = "com.xyz.scalamodule.HiveTest"

    val classLoader = ClassLoader.getSystemClassLoader
    val clazz = classLoader.loadClass(methodname)
    println(clazz.getMethods.toString)
    println(clazz.getClasses.toString)
    println(clazz.getDeclaredFields.toString)
    val method = clazz.getMethod("doTask", classOf[Array[String]])
    method.invoke(clazz.newInstance(), argsarr)

  }
}
